package com.ziyia.a4_6;

import android.content.Context;
import android.os.Bundle;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;

import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import java.util.concurrent.BlockingDeque;

public class TestFragment extends Fragment {


    private static final String TAG = "Fragment生命周期日志";

    @Override
    public void onAttach(@NonNull Context context) {
        super.onAttach(context);
        Log.e(TAG, "--------onAttach--------");
    }

    @Override
    public void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        Log.e(TAG, "--------onCreate--------");
    }


    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        Log.e(TAG, "--------onCreateView--------");
        return inflater.inflate(R.layout.fragment_test, container, false);
    }

    @Override
    public void onActivityCreated(@Nullable Bundle savedInstanceState) {
        super.onActivityCreated(savedInstanceState);
        Log.e(TAG, "--------onActivityCreated--------");
    }

    @Override
    public void onStart() {
        super.onStart();
        Log.e(TAG, "--------onStart--------");
    }

    @Override
    public void onResume() {
        super.onResume();
        Log.e(TAG, "--------onResume--------");
    }

    @Override
    public void onPause() {
        super.onPause();
        Log.e(TAG, "--------onPause--------");
    }

    @Override
    public void onStop() {
        super.onStop();
        Log.e(TAG, "--------onStop--------");
    }

    @Override
    public void onDestroyView() {
        super.onDestroyView();
        Log.e(TAG, "--------onDestroyView--------");
    }


    @Override
    public void onDestroy() {
        super.onDestroy();
        Log.e(TAG, "--------onDestroy--------");
    }

    @Override
    public void onDetach() {
        super.onDetach();
        Log.e(TAG, "--------onDetach--------");
    }
}